<?php if ( ! defined('WDK_PATH')) exit('No direct script access allowed');?>
<!--{**************************************************************************}-->
<style>
ul.tabmenu			{list-style: none;margin: 0px;padding: 0px;}
ul.tabmenu li		{float:left;margin-right:3px;height:32px;}
ul.tabmenu li a		{padding:5px 7px;border:1px solid #D9D9D9;height:18px;}
ul.tabmenu li a.on	{background-color:#DC4616;color:#FFF;}
textarea	{height:150px;}
</style>
<!--{**************************************************************************}-->
<form id="msgForm" action="" method="POST">
<table class="form">
	<caption>
		<div class="fl">
			<ul class="tabmenu">
				<li><a href="/user/msg">받은쪽지</a></li>
				<li><a href="/user/msg/send">보낸쪽지</a></li>
				<li><a class="on" href="/user/msg/form">쓰기</a></li>
			</ul>
		</div>
	</caption>
	<tbody>
		<tr>
			<th>받는사람</th>
			<td>
				<input type="text" name="user_login_id" class="input"/>
			</td>
		</tr>
		<tr>
			<th>제목</th>
			<td>
				<input type="text" name="message_title" class="input" style="width:98%"/>
			</td>
		</tr>
		<tr>
			<th>내용</th>
			<td>
				<textarea name="message_content"></textarea>
			</td>
		</tr>
	</tbody>
	<tfoot>
		<tr>
			<td colspan="2">
				<div class="fr">
					<a id="btn_send" class="btn" href="javascript:;">보내기</a>
				</div>
			</td>
		</tr>
	</tfoot>
</table>
</form>
<!--{**************************************************************************}-->
<script>
(function($){
	$('#btn_send').click(function(){
		if($(':text[name=user_login_id]').val() == '')
		{
			alert('받는사람 아이디를 입력하십시오.');
			return $(':text[name=user_login_id]').focus();
		}
		if($(':text[name=message_title]').val() == '')
		{
			alert('제목을 입력하십시오.');
			return $(':text[name=message_title]').focus();
		}
		if($('textarea').val() == '')
		{
			alert('내용을 입력하십시오.');
			return $('textarea').focus();
		}
		if(confirm('메세지를 전송하시겠습니까?'))
		{
			$('#msgForm').submit();
		}
	});
})(jQuery);
</script>
<!--{**************************************************************************}-->